package chapter4;

public class MultiArrayStudy {

	public static void main(String[] args) {

		int[][] nums;
		nums = new int[3][5];
		nums[0][0] = 1;
		nums[0][1] = 2;
		nums[0][2] = 3;
		nums[0][3] = 4;
		nums[0][4] = 5;
		nums[1][0] = 6;
		nums[1][1] = 7;
		nums[1][2] = 8;
		nums[1][3] = 9;
		nums[1][4] = 10;
		nums[2][0] = 11;
		nums[2][1] = 12;
		nums[2][2] = 13;
		nums[2][3] = 14;
		nums[2][4] = 15;

		for (int i = 0; i < nums.length; i++) {
			for (int h = 0; h < nums[0].length; h++) {
				System.out.print(nums[i][h] + " ");
			}
			System.out.println("");
		}

		int[] a = new int[4];
		int number = 4;
		for (int i = 0; i < a.length; i++) {
			a[i] = number--;
		}
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + " ");
		}
		System.out.println("");
		

		int[][] hard = new int[3][6];
		int num = 18;
		for (int i = 0; i < hard.length; i++) {
			for (int k = 0; k < hard[i].length; k++) {
				hard[i][k] = num--;
			}
		}

		for (int i = 0; i < hard.length; i++) {
			for (int k = 0; k < hard[i].length; k++) {
				System.out.print(hard[i][k] + " ");
			}
			System.out.println("");
		}

	}

}
